# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
pkgname=jrsonnet-cli
pkgver=0.4.2
pkgrel=1
pkgdesc="Rust implementation of Jsonnet language"
url="https://github.com/CertainLach/jrsonnet"
# riscv64: libc crate
arch="all !riscv64"
license="MIT"
makedepends="cargo cargo-auditable"
source="https://github.com/CertainLach/jrsonnet/archive/refs/tags/v$pkgver/jrsonnet-v$pkgver.tar.gz"
builddir="$srcdir/jrsonnet-$pkgver"


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --offline --release -p jrsonnet
}

check() {
	cargo test --frozen --offline
}

package() {
	install -Dm755 target/release/jrsonnet "$pkgdir"/usr/bin/jrsonnet
}

sha512sums="
884feaba07e95d993bd47ecee06b0a3acfd47febf411558430e8dca8e418bade47d85f9a552e34c5e4f8b3f4e44596eb616cf1928cc33fde98f7440e025edd1e  jrsonnet-v0.4.2.tar.gz
"
